package com.gugee.tiktok.data.consumer.blogger.config;

import com.alibaba.nacos.api.config.annotation.NacosValue;
import lombok.Getter;
import lombok.Setter;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: luolifeng
 * Date: 2020-10-20 12:02
 */
@Configuration
@Getter
@Setter
public class DataConsumerConfig {
    @Value("${tiktok.data.query.latestDays:30}")
    int latestDays;
    /**
     * 日志打印时间要求
     */
    @NacosValue(value="${tiktok.data.blogger.logTime.debug.limit}", autoRefreshed = true)
    long debugTimeLimit;

    @NacosValue(value="${tiktok.data.blogger.total.require.FollowerCount}", autoRefreshed = true)
    int followerCount;
    @NacosValue(value="${tiktok.data.blogger.logTime.updateBlogger.limit}", autoRefreshed = true)
    long updateBloggerTime;
    @NacosValue(value="${tiktok.data.hashtag.collect.day:7}", autoRefreshed = true)
    int hashtagClDays;
    @Value(value="${tiktok.data.threadpools.blogger.corePollSize}")
    int corePollSize;
    @Value(value="${tiktok.data.threadpools.blogger.queueSize}")
    int queueSize;
    @Value(value="${kafka.topics.blogger.online}")
    String bloggerOnlineTopic;

    @Value(value="${kafka.topics.market.online}")
    String marketOnlineTopic;
    @NacosValue(value="${tiktok.data.batchQuery.nums:500}", autoRefreshed = true)
    int batchNums;
    /**
     * 消息重发最大次数
     */
    @NacosValue(value="${tiktok.task.message.blogger.retry:3}", autoRefreshed = true)
    int retryBloggerTimes;

    /**
     * 是否对视频图片做更新
     */
    @NacosValue(value="${tiktok.data.blogger.aweme.picUpdate:false}", autoRefreshed = true)
    boolean awemePicUpdate;

    @NacosValue(value="${tiktok.data.mention.logTime.debug.limit}", autoRefreshed = true)
    long mentionDebugTimeLimit;

    /**
     * 博主头像过期时间
     */
    @NacosValue(value="${tiktok.data.blogger.avatar.expires.hour:24}", autoRefreshed = true)
    int bloggerAvatarExpiresTime;

    /**
     * 博主获取ai分析年龄、性别主题
     */
    @Value(value="${kafka.topics.bloggerAiExt.online}")
    private String bloggerAiExtTopicOnline;

    /**
     * ai分析连接池大小
     */
    @Value(value="${tiktok.data.threadpools.bloggerAiExt.corePollSize:20}")
    int bloggerAiExtPollSize;

    /**
     * ai分析接口消息时间限制
     */
    @NacosValue(value="${tiktok.data.bloggerAiExt.accept.minTime.limit:1440}", autoRefreshed = true)
    int acceptBloggerAiExtMsgTimeMinRange;

    /**
     * 视频存在的消息时间限制
     */
    @NacosValue(value="${tiktok.data.awemeExist.accept.minTime.limit:1440}", autoRefreshed = true)
    int acceptAwemeExistMsgTimeMinRange;

    /**
     * 粉丝画像统计语言分布top个数
     */
    @NacosValue(value="${tiktok.blogger.fans.portrait.statistics.language.top}", autoRefreshed = true)
    int fansPortraitStatisticsLanguageTop;

    /**
     * 粉丝画像统计国家分布top个数
     */
    @NacosValue(value="${tiktok.blogger.fans.portrait.statistics.region.top}", autoRefreshed = true)
    private int fansPortraitStatisticsRegionTop;

    /**
     * 粉丝画像计算初始线程数
     */
    @NacosValue(value="${tiktok.blogger.fans.portrait.threadPool.size}", autoRefreshed = true)
    private int fansPortraitThreadPoolSize;
}
